[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function memory_strategy - get/set memory alloc strategy
Syntax int memory_strategy(boolean read, int *strategy);
Prototype in ibm.h
Remarks this function will get or set the memory allocation
strategy. The variable read determines whether the
function will read or write (get or set) the
strategy value stored at *strategy.
Return value returns zero if successful (and *strategy is the
strategy being used) or, if an error occurs, the
error code (in which case the value in *strategy is
meaningless.)
Note this function requires DOS 3.xx.
See also ibm.h
Example #include <ibm.h>
#define GET TRUE /* read */
#define SET FALSE /* write */
main()
{
int memstrat;
if (memory_strategy(GET,&memstrat) !=
MEM_STRAT_BEST)
memory_strategy(SET,MEM_STRAT_BEST);
}
/* Bad, no error checking done. When you document
350+ functions, you write the best code, don't you? */
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson